1. Field of the Invention
The present invention relates to a controller for machining a contour shape by controlling a servo motor and a motor (spindle motor) driving a main shaft in a synchronous manner.
2. Description of the Prior Art
In order to allow a machine tool to perform machining at a high speed and with a high accuracy according to a controller, it is required to make severe adjustment of various control parameters such as a speed loop gain, a position loop gain, an acceleration/deceleration time constant and the like to a servo motor which is a driving source for a machine tool or a motor for a main shaft driving (hereinafter, referred to as a spindle motor).
As a adjusting method of control parameters, such a method of trial and error has been employed that an actual machining is performed, the control parameters are adjusted based on the results of measurement/evaluation of the contour shape obtained by the actual machining, and a machining is performed again to repeat adjustment of the control parameters based on the result of measurement/evaluation of the contour shape thus obtained so that optimal parameter values are obtained.
Also, conventionally, as means for measuring the machined result, a technique of measuring, displaying and evaluating a contour shape using positional feedback data from a servo motor has been disclosed in Japanese Patent Application Laid-Open No. 4-177408 and the like. Also, evaluation using feedback signals from a detector provided on a spindle motor has been performed.
However, control parameters, set when a contour shape machining is conducted in a synchronously controlling manner of a mechanically movable portion (hereinafter, referred to as xe2x80x9cservo axisxe2x80x9d) driven by a servo motor and a main shaft (hereinafter, referred to as xe2x80x9cspindle axisxe2x80x9d) driven by a spindle motor, can only be adjusted by means of the above-mentioned trial and error method where a machined contour shape which has been obtained by an actual machining is actually measured to obtain the contour shape.
In a method for measuring a workpiece directly, skill for measurement and cost for a measuring device are required and an error in measurement may occur in some cases. Furthermore, even when the measured results are evaluated, such results must be input, which results in time and labor consuming work. Also, in order to establish final control parameters, machining must be repeated according to the method of trial and error, which results in much time consuming and using workpieces wastefully.
An object of the present invention is to provide a controller which synchronously controls a servo motor and a spindle motor to machine a contour shape and which can automatically output the machined result obtained by contour machining for evaluation of the result.
In order to achieve the above object, a controller according to the present invention comprises collecting means which takes in positional data of a servo axis and positional data of a spindle axis at the same timing for each predetermined cycle, storing means for storing the positional data of the servo axis and the positional data of the spindle axis collected by the collecting means, and converting means which converts the collected positional data to obtain machining shape data. The machining shape data obtained by the converting means may be displayed on a display device of the controller or on a display device connected to the controller, or may be printed by a printer connected to the controller.
Also, a machining contour shape obtained from the machining shape data and a contour shape outputted from a instruction program or a reference contour shape set in advance can be displayed or printed for comparison with each other to find discrepancies between them so that the machining contour shape can be evaluated.
According to the present invention, when a contour machining is performed by controlling a servo axis which is linearly driven and a spindle axis which is rotationally driven synchronously, a machining contour shape can be displayed or printed automatically. Therefore, the machined result can be outputted and evaluated automatically without conducting measurement work of a workpiece obtained by the contour machining.
An evaluation based upon an actual machining is a much time-consuming work which requires process such as preparation of workpiece and tools, coarse machining or finishing machining, and process such as mounting work to a measuring instrument, measurement, output of measurement result, and the like. On the other hand, according to the present invention, evaluation of an error in shape can be made without conducting an actual machining in such a manner as described above, and it is made possible to conduct rapid adjustment of control parameters based on the evaluation result.
Also, since the shape data can be obtained from a controller or a personal computer, adjustment of control parameters of the controller can be made automatically based on evaluation result.